Course: CIS-546 DATA VISUALIZATION

Term: Spring/T2

Data: The IMF publishes a range of time series data on IMF lending, exchange rates and other economic and financial indicators.

DASHBOARD IMF analysis

Workspace preparation

Approach


In this section the workspace will be prepared. This means that first the global environment will be cleaned, and all required packages will be loaded.


Clean Workspace

rm(list = ls())

Install libraries

## Install packages
#install.packages("tidyverse")
#install.packages("knitr")
#install.packages("rmarkdown")
#install.packages("tinytex")
#install.packages("dplyr")
#install.packages("kableExtra")

Load packages

library(shiny)
library(shinydashboard)
library(tidyverse)
library(dplyr)
library(readxl)
library(reshape)
library(gganimate)
library(gifski)
library(png)
library(plotly)

Load Dataset

## Load data of stocks with headlines and description
setwd("/Users/MaxFranke/Desktop/05_Big Data Analytics/04_Classes/04 SP:Term2/CIS-546 DATA VISUALIZATION/05_TermProject/TermProject/01_Data")
gdp <- read.csv("WEOOct2019all.csv")
weo <- read.csv("WEO_Data.csv")

Preprocessing of data

The datasets show years as different columns and the dimensions are wrong, which means that data wrangling and processing has to be done:

  1. Change the column names from Year by deleting the first character “X”

  2. Select the important columns (e.g. delete the WEO.Country.Code)

  3. Use “melt” to summarise all year columns in one column and use “WEO.Subject.Code”, and “Country” as an ID

  4. Change the summarized values from factor to numeric values

  5. Change the Year column to format “Year”

Approach

The Idea of the dashboard

The dashboard is structured into three areas (channels):

  1. National Account

  2. Trade

  3. People

In the first area, the following variables are included:

  • Gross domestic product, constant prices
  • Gross domestic product, constant prices (percent changes)
  • Inflation, average consumer prices
  • Total investment

In the second area, the following variables are included:

  • Volume of imports of goods and services
  • Volume of exports of goods and services
  • Volume of Imports of goods
  • Volume of exports of goods

In the third area, the following variables are included:

  • Unemployment rate
  • Employment
  • Population
  • Current account balance

In the following chapters, the visualization will be produced, which will be implemented into the dashboard with shiny.

The dashboard can be found with the following link:

https://max-franke.shinyapps.io/IMF_analysis/

National Account

GDP

Interpretation

This graph shows the GDP development, divided by the European Union, Middle East and Central Asia, and the full world. There is a break in the year 2008 / 2009 which can be explained by the financial crises during this time.

Also, this graph is the first entry to the dashboard later on. The user will see an animated graph as an eyecatcher, which shows the differences between these regions over the years.

In the next section, inflation is plotted comparably. This graph will be plotted next to the GDP graph. So, the user can compare the development of Inflation and GDP over the years by animated graphs.

Inflation

Interpretation

This graph shows that in all three areas the inflation was positive, so no deflation occurred Also, there a concerning the percentage change some differences over the years and between the areas. Between 1990-2000 there are some peaks in the areas Middle East and Central Asia and the world, which can show a relationship between these circumstances.

GDP development per country

Interpretation

This graph will be used in the dashboard later on, as followed:

There will be a slider for Country, so the User can select a country and a line will be added to the graph. As a conclusion, the user can customize this graph in his specific way.

Additionally, there will be a table, which represents the last 5 years and the change in GDP for the selected countries.

Total Investments

Interpretation

This graph is the last section for the first channel “National Account” of the dashboard. There will be a filter for “Country” and “Year range”. The user can customize the graph for every country in the dataset and select a year range between 1980 and 2020.

The graph above shows an example without the filters. Here, it can be seen that Germany has a wider range of total investments for the years 1980 - 2020 in comparison to the United States.

Trade

Volume of imports / exports of goods and services

Interpretation

This two graphs compare the volume of imports and exports between different countries and year ranges. In the dashboard, there will be filters for selecting specific countries to compare and to adjust the y-axis of years. The pro of selecting a year range with a filter in comparison to do it manually with ggplotly by drawing a square is that both graphs change their y-axis and the graphs are comparable.

In this example, there is a comparison between Germany and the United States. The cliche that Germany is an export champion is poorly not true concerning the last few years!

Volume of imports of goods

Volume of exports of goods

Interpretation

These two graphs will be added to the dashboard in the way that the User can chose via a action button between Volume of Goods and Volume of Goods and Services. There is sometimes a slight difference, so more informations are provided for the User.

People

Unemployment rate

Employment

Population

Current account balance